package work.timejay.shop.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import work.timejay.common.SuperModel;

/**
 * <p>
 *
 * </p>
 *
 * @author wwj
 * @since 2021-12-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user_item")
@ApiModel(value = "UserItem对象", description = "")
@AllArgsConstructor
public class UserItem extends SuperModel<UserItem> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "商品名称")
    @TableField("item_name")
    private String itemName;

    /**
     * 商品数量
     */
    @ApiModelProperty(value = "商品数量")
    @TableField("count")
    private Long count;

    /**
     * 数据封装
     */
    public UserItem(String itemName, Long userId) {
        this.userId = userId;
        this.itemName = itemName;
    }

    public UserItem() {
    }

    public static final String USER_ID = "user_id";

    public static final String ITEM_NAME = "item_name";

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
